<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>namespace 模式</title>
</head>
<body>
<script src="module1.js"></script>
<script>
    module1.foo()

    module1.data = "xyz"

    module1.foo()
</script>
</body>
</html>